package fr.ifsic.film.client.ui;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public abstract class DetailsType extends VerticalPanel {
	protected Label labelShowTitle;
	protected VerticalPanel verticalPanel = new VerticalPanel();
	protected Button btnNewButton = new Button("Retour");

	public DetailsType(String title) {
		labelShowTitle = new Label(title);

		add(verticalPanel);
		verticalPanel.add(labelShowTitle);
		verticalPanel.setCellHorizontalAlignment(labelShowTitle,
				HasHorizontalAlignment.ALIGN_CENTER);

		btnNewButton.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				retour();
			}
		});

	}

	abstract void retour();

}
